import 'package:flutterlib/common/channel/asynchronous_method_channel.dart';

class GetDataASYNCUtils {
  GetDataASYNCUtils._();

  static var platform = AsynchronousMethodChannel('AsynchronousMethodChannelExample');

  // receive
  static handleBasicMessageChannelReceive(String method, [arguments]) async {
    // Platform messages may fail, so we use a try/catch PlatformException.
    try {
      return await platform.invokeAsynchronousMethod(method, [arguments]);
    } catch (e) {
      print("geterror" + e.toString());
    }
  }


  static testHandle(){
    TestData data  = handleBasicMessageChannelReceive("method");
  }


  //send
//  handleBasicMessageChannelSend(String type) async {
//    String response = await _basicMessageChannel.send(type);
//    return response;
//  }
}
class TestData{
  String name;
}
